package com.yyg.traffic.web;

import com.yyg.traffic.domain.User;
import com.yyg.traffic.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @ResponseBody
    @GetMapping("/user")
    public List<User> findUserAll(){
        List<User>list=userService.findUserAll();
        return list ;
    }
}
